{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>

<link href="template/style/css/style.css" type="text/css" rel="stylesheet" />

<style>
label.error {color:red;}
input {
	vertical-align: -5px;_vertical-align: -1px;margin-right: 5px
}
</style>
<script type="text/javascript">
$(function(){
	$('#merchant_form').validate({
    	onkeyup : false,
 		onfocusout : false,
		rules : {
			user_name: {
				required: true,
				byteRange : [ 3, 25, '{$charset}' ],
				remote : {
					url : 'index.php?app=member&act=check_user&ajax=1',
					type : 'get',
					data : {
						user_name : function() {
							return $('#user_name').val();
						}
					}
				}
			},
			password : {
				minlength : 6,
				maxlength : 20
			},
			password2 : {
				equalTo : '#password'
			},
			type_id: {
				min: 1
			},
			email : {
				email : true,
				remote : {
					url : 'index.php?app=member&act=check_email&ajax=1',
					type : 'get',
					data : {
						email : function() {
							return $('#email').val();
						}
					}
				}
			}
		},
		messages : {
			user_name: {
				required: '用户名不能为空',
				byteRange: '用户名名必须在3-15个字符之间',
				remote: '您提供的用户名已存在'
			},
			password : {
				minlength : '密码长度应在6-20个字符之间',
				maxlength : '密码长度应在6-20个字符之间'
			},
			password2 : {
				equalTo : '两次输入的密码不一致'
			},
			type_id: {
				min: '请选择布行/档口类型'
			},
			email : {
				email : '邮箱格式不正确',
				remote : '该邮箱已存在'
			}
		}
	});
});
</script>
</head>
<body class="body-bg" style="overflow: auto;">
<div class="header">
	<div class="logo">
		<h1>欢迎加入缘色供应链管理平台</h1>
		<h2>第一时间客户面料需求发布，回复就有机会下单；更新维护你的面料库，让客户第一时间找上门</h2>
	</div>
</div>
<div class="sub-body">
	<div class="tab-frame">
    <form id="merchant_form" method="post">
        <table width="100%" cellspacing="0" cellpadding="0" align="left" class="tab-display">
            <tbody>
                 <tr>
					<td width="15%" align="right">用户名:&nbsp;&nbsp;</td>
					<td align="left">
						<input type="text" id="user_name" name="user_name" class="input-1" value=""
							style="width: 162px;" />
					</td>
				</tr>
				<tr>
					<td width="15%" align="right">登陆密码:&nbsp;&nbsp;</td>
					<td align="left">
						<input type="password" id="password" name="password" class="input-1" value=""
							style="width: 162px;" />
					</td>
				</tr>
				<tr>
					<td width="15%" align="right">确认密码:&nbsp;&nbsp;</td>
					<td align="left">
						<input type="password" id="password2" name="password2" class="input-1" value=""
							style="width: 162px;" />
					</td>
				</tr>
                 <tr>
						<td align="right">布行/档口类型:&nbsp;&nbsp;</td>
						<td align="left">
							<select name="type_id" id="type_id">
								<option value="0"></option>
								{html_options options=$fabric_types selected=$fabric_shop.type_id}
					        </select>
						</td>
				</tr>
                 <tr>
						<td align="right">详细地址:&nbsp;&nbsp;</td>
						<td align="left">
							<input type="text" class="input-1" name="address" id="address" value="{$merch.address|escape}" style="width: 500px;" />
						</td>
					</tr>
					<tr>
						<td align="right">固定电话:&nbsp;&nbsp;</td>
						<td align="left">
							<input type="text" class="input-1" name="phone_tel" id="phone_tel" value="{$merch.phone_tel|escape}" />
						</td>
					</tr>
					<tr>
						<td align="right">手机号码:&nbsp;&nbsp;</td>
						<td align="left">
							<input type="text" class="input-1" name="phone_mob" id="phone_mob" value="{$merch.phone_mob|escape}" />
						</td>
					</tr>
					<tr>
						<td align="right">邮箱:&nbsp;&nbsp;</td>
						<td align="left">
							<input type="text" class="input-1" name="email" id="email" value="{$merch.email|escape}" />
						</td>
					</tr>
					<tr>
						<td align="right">QQ:&nbsp;&nbsp;</td>
						<td align="left">
							<input type="text" class="input-1" name="is_qq" id="is_qq" value="{$merch.is_qq|escape}" />
						</td>
					</tr>
	                 <tr>
		                <td colspan="2">
	                        <input type="submit" value="注 册" id="submit" class="btn-2" />
	                        <input type="button" value="返回" class="btn-2" onclick="history.back();" />
		                </td>
	                </tr>
	            </tbody>
	         </table>
	    </form>
	</div>
 </div>
<script language="JavaScript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</body>
{$async_sendmail}
</html>